<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>岗位信息</title>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
</head>
<body style="overflow-y: hidden" scroll="no">
	<t:formvalid formid="formobj" dialog="true" usePlugin="password"
		layout="table" action="postController.do?save">
		<input id="id" name="id" type="hidden" value="${postPage.id }">
		<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
			<tr>
				<td align="right">
					<label class="Validform_label"> 岗位名称: </label>
				</td>
				<td class="value"><input class="inputxt" id="name" name="name" ignore="ignore" value="${postPage.name}">
					<span class="Validform_checktip"></span>
				</td>
			</tr>
			<tr>
				<td align="right">
					<label class="Validform_label"> 人员: </label>
				</td>
				<td class="value" nowrap>
					<input name="userid" type="hidden" value="${postPage.userid }" id="userid">
					<input name="username" class="inputxt" value="${postPage.username }" id="username" readonly="readonly" datatype="*" />
					<a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" onClick="chooseUser()">选择</a>
					<a href="#" class="easyui-linkbutton" plain="true" icon="icon-del" onClick="clearUser()">清空</a> 
					<span class="Validform_checktip"></span>
				</td>
			</tr>

			<tr>
				<td align="right"><label class="Validform_label"> 工序: </label></td>
				<td class="value">
					<input class="inputxt" type="hidden" id="processid" name="processid" ignore="ignore" value="${postPage.processid}">
					<input class="inputxt" id="processname" name="processname" ignore="ignore" value="${postPage.processname}">
					<span class="Validform_checktip"></span>
				</td>
			</tr>
			
			<tr>
				<td align="right"><label class="Validform_label"> 工段: </label></td>
				<td class="value">
					<%-- <input class="inputxt" id="describe" name="describe" ignore="ignore" value="${postPage.describe}"> --%>
					<t:comboBox url="jeecgDemoController.do?combox" name="sex" text="userName" id="id"></t:comboBox>
					<span class="Validform_checktip"></span>
				</td>
			</tr>
			
			<tr>
				<td align="right"><label class="Validform_label"> 描述: </label></td>
				<td class="value"><input class="inputxt" id="describe"
					name="describe" ignore="ignore" value="${postPage.describe}">
					<span class="Validform_checktip"></span></td>
			</tr>
		</table>
	</t:formvalid>
</body>

<script type="text/javascript">
	// add by XQG
	function chooseUser() {
		var width = 500;
		var height = 400;
		createWin("选择人员", "postController.do?users", width, height);
	}

	//选择界面  add by XQG
	function createWin(title, addurl, width, height) {
		$.dialog({
			content : 'url:' + addurl,
			lock : true,
			zIndex : getzIndex(),
			width : width,
			height : height,
			title : title,
			opacity : 0.3,
			cache : false,
			ok : function() {
				window = this.Window;
				iframe = this.iframe.contentWindow;
				var userList = iframe.getParentWin(window);
				if (userList == "" || userList == null
						|| userList == "undefined") {
					return false;
				}
				;
				iframe.getParentWin(window);
			},
			cancelVal : '关闭',
			cancel : true
		});
	}
	
	var username;
	var userid;
	
	function chooseUserValue(rows, User) {
		username = rows[0].realName;
		userid = rows[0].id;
		for(var i=1;i<rows.length;i++){
			userid = userid + ',' + rows[i].id;
			username = username + ',' + rows[i].realName;
		}
		document.getElementById('username').value = username;
		document.getElementById('userid').value = userid;
	}
	
	function clearUser(){
		document.getElementById('username').value = '';
		document.getElementById('userid').value = '';
	}
</script>